window.processing = true;

Shop

window.sortBy = "manual";
window.processing = false;
window.productCardList = [{"id":9869946323225,"title":"Shadow \u0026 Cream Glass - 2 Pack","handle":"shadow-cream-glass","description":"\u003cp\u003eShadow \u0026amp; Cream Glass\u003c\/p\u003e","published_at":"2025-03-03T06:26:03-05:00","created_at":"2025-03-03T06:15:40-05:00","vendor":"Pinter","type":"Merchandise","tags":["MERCHANDISE"],"price":1500,"price_min":1500,"price_max":1500,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":50481795105049,"title":"One-off","option1":"One-off","option2":null,"option3":null,"sku":"ICSGLASS1","requires_shipping":true,"taxable":true,"featured_image":null,"available":true,"name":"Shadow \u0026 Cream Glass - 2 Pack - One-off","public_title":"One-off","options":["One-off"],"price":1500,"weight":454,"compare_at_price":null,"inventory_management":"shopify","barcode":"","requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":[],"featured_image":null,"options":["Title"],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003eShadow \u0026amp; Cream Glass\u003c\/p\u003e"}]; callSortingFunction(); function callSortingFunction() { if(window.processing) { setTimeout(function() { callSortingFunction(); },1000); } var sorted_items = getSorted('.card-product', 'data-sort', window.sortBy); $('.listing-shop__inner').html(sorted_items); } function getSorted(selector, attrName, ascordesc) { return $($(selector).toArray().sort(function(a, b){ var aType = a.getAttribute('data-type'); var bType = b.getAttribute('data-type'); var aAvailable = a.getAttribute('data-available'); var bAvailable = b.getAttribute('data-available'); if ((aType === "Pinter" && aAvailable) && (bType === "Tap" || bType === "Co-Pinter")) return -1; else if (aType === "Tap" && aAvailable && bType === "Co-Pinter") return -1; else if (bType === "Pinter" && bAvailable && (aType === "Tap" || aType === "Co-Pinter")) return 1; else if (bType === "Tap" && bAvailable && aType === "Co-Pinter") return 1; else if ((aType === "Tap" || aType === "Pinter" || aType === "Co-Pinter") && aAvailable && (bType !== "Tap" && bType !== "Pinter" && bType !== "Co-Pinter")) return -1; else if ((aType !== "Tap" && aType !== "Pinter" && aType !== "Co-Pinter") && bAvailable && (bType === "Tap" || bType === "Pinter" || bType === "Co-Pinter")) return 1; else if (aAvailable === "false" && bAvailable === "true") return 1; else if (aAvailable === "true" && bAvailable === "false") return -1; var aVal = parseInt(a.getAttribute(attrName)), bVal = parseInt(b.getAttribute(attrName)); if(ascordesc == 'price-ascending'){ return aVal - bVal; } if(ascordesc == 'price-dec'){ return bVal - aVal; } })); }